package com.walter.epay.paramenum.createorder;

/**
 * 创建订单参数常量
 *
 * @author: wuchenxi
 * @date: 2022/12/31 13:52:52
 */
public enum EpayCreateOrderTypeEnum {
    /**
     * 微信支付
     */
    WX(1),

    /**
     * 支付宝支付
     */
    ZFB(2);

    private final int type;

    EpayCreateOrderTypeEnum(int type) {
        this.type = type;
    }

    public static EpayCreateOrderTypeEnum getByCode(int code) {
        for (EpayCreateOrderTypeEnum value : EpayCreateOrderTypeEnum.values()) {
            if (value.getType() == code) {
                return value;
            }
        }
        return null;
    }

    public int getType() {
        return type;
    }

}
